{% extends 'master/base.html' %}

{% block htmlhead %}
    {% load html_tools %}
    {{ 'szuspeech/manage_form.css' | as_css }}
{% endblock %}

{% block content %}
<form enctype="multipart/form-data" method="post" action="">
    {% csrf_token %}
    <div class="content">
        <li>
            <label>标题</label>
            {{ form.resource_title }}
            <span class="error">
                {% for error in form.resource_title.errors %}
                    {{ error }}
                {% endfor %}
            </span>
        </li>
        <div class="line_list"></div>
        <li>
            <label>简介</label>
            {{ form.resource_intro }}
            <span class="error">
                {% for error in form.resource_intro.errors %}
                    {{ error }}
                {% endfor %}
            </span>
        </li>
        <div class="line_list"></div>
        <li>
            <label>资源上传</label>
            <p class="upload_file">{{ form.uploaded_file }}</p>
            <span class="error">
                {% for error in form.uploaded_file.errors %}
                    {{ error }}
                {% endfor %}
            </span>
        </li>
        <div class="line_list"></div>
        <li>
            <label>是否可预览</label>
            {{ form.is_preview }}
            <span class="error">
                {% for error in form.is_preview.errors %}
                    {{ error }}
                {% endfor %}
            </span>
        </li>
    </div>
    <div class="line_aside"></div>
    <div class="content">
        <li>
            <label>预览图片1</label>
            <p class="upload_file">{{ form.preview1 }}</p>
            <span class="error">
                {% for error in form.preview1.errors %}
                    {{ error }}
                {% endfor %}
            </span>
        </li>
        <div class="line_list"></div>
        <li>
            <label>预览图片2</label>
            <p class="upload_file">{{ form.preview2 }}</p>
            <span class="error">
                {% for error in form.preview2.errors %}
                    {{ error }}
                {% endfor %}
            </span>
        </li>
        <div class="line_list"></div>
        <li>
            <label>预览图片3</label>
            <p class="upload_file">{{ form.preview3 }}</p>
            <span class="error">
                {% for error in form.preview3.errors %}
                    {{ error }}
                {% endfor %}
            </span>
        </li>
    </div>
    <div class="line_aside"></div>   
    <input type="submit" value="提交" class="add">    
</form>  
{% endblock %}
